1. Technical Field
This invention relates generally to signal processing and more particularly to an improved system for interfacing an encoder with quadrature phase outputs, such as a displacement sensor or rotary encoder, to a computer.
2. Background Information
Optical encoders which, either directly or after wave shaping, produce quadrature phase signals representative of linear or rotational displacement or some other variable parameter, are well known. The output signals from such encoders are often employed to provide a numeric display of the magnitude and direction of the measured parameter. In some applications the quadrature phase signals are processed to interface with a computer such as a microprocessor.
An example of the latter situation is the Resistance Spot Welder Adaptive Control which is the subject of the inventor's earlier patent, U.S. Pat. No. 4,447,700 issued May 8, 1984. In such application it is necessary to supply a computer with accurate displacement data which is used by the spot welder control system to control the formation of a resistance spot weld in process. The spot welder control system depends on the accuracy and reliability of the displacement signal in order to make decisions in real time affecting the welding parameters, and also to evaluate the resulting weld quality.
A quadrature phase signal displacement sensor and interface designed for use in such a spot welder control system is described in applicant's U.S. Pat. No. 4,461,944 dated July 24, 1984. The signal processor of this earlier patent employs an edge detection scheme to generate up and down pulses which in turn are converted into computer readable data that appears to the computer as a variable in its memory.
Many sources of interference occur in a factory where a spot welder may be employed which can result in noise being induced on the signal lines from the displacement transducer, causing the computer of the welder control system to misinterpret the displacement information. It is possible that this incorrect displacement data could then be used to make a bad decision associated with the real time selection of suitable welding parameters and/or to misclassify a good weld as bad or vice versa. Applicant has found that his prior edge detection method is subject to noise and requires extra shielding from intereference caused by 20,000 amp weld currents. Further applicant has determined that, when such noise or intereference occurs, the computer of the spot welder control system should be immediately informed of any inaccurate data points which are sampled as they occur in order to avoid making a suboptimal control decision. Without the ability to detect nonallowed states, inaccuracies can accumulate with each loss of tracking that occurs.
The displacement interface of applicant's prior U.S. Pat. No. 4,461,944 employs a 16-bit up-down counter which in two's complement format has a range of -32,768 to +32,767. Aside from increasing the size of the counter, the prior system makes no provision for accommodating displacements which exceed the stated range. Likewise applicant's earlier patent does not contemplate any technique for conserving computer overhead by selectively sampling the output data from the displacement interface only when a change in displacement occurs.
Other patents partially address certain of these limitations. For example, U.S. Pat. No. 3,906,194 to D. G. Fairbairn describes a quadrature phase signal processor which instead of edge detection employs a pair of cascaded clocked registers and a ROM to convert such signals into pulse trains which can drive counters or provide cursor control signals to a display monitor. A somewhat similar system is shown in U.S. Pat. No. 4,476,567 to R. F. Johnson. In the "Electronic Protractor" of this latter patent, angular deviations of a control surface cause phase quadrature output signals to be produced from an optical encoder. Successive values of the quadrature phase signals are latched into a PROM which in turn decodes these inputs into clockwise transitions, counter-clockwise transitions, no change conditions and illegal conditions. The clockwise and counter-clockwise transitions are registered by an up-down counter which in turn drives a digital display to indicate the magnitude and direction of the angular deviation of the control surface. The illegal condition is used to set a flip-flop which flags an error by turning on an error light. A reset button clears the flip-flop and turns off the error light.
Although U.S. Pat. No. 4,476,567 recognizes the existence of a "no change" state, no provision is made to use this information. In the event of an error condition, this previously patented signal processor simply produces a light output for an operator to visually see that there is an error. The counter is free to continue to change value so unless the operator happens to be looking at the display when the error light comes on, he would not know what the latest valid count value is, nor would the operator be able to obtain it. Further this patent does not discuss any method for dealing with a count value which goes out of range, i.e. which exceeds the maximum range of the counter.
Finally, U.S. Pat. No. 4,334,222 to M. R. Kelley et al discusses a count overflow protection circuit for use when the incremental detent count of an up-down counter exceeds the capacity of that counter. However, this circuit only provides for retention of a maximum count and does not facilitate extension of the range of the counter.
A need is thus perceived for an enhanced signal processor for converting quadrature phase signals into data directly readable by a computer, for spot welding control and other diverse applications, and which exhibits higher noise immunity, greater reliability, expanded range and increased processing efficiency.